import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store/index'
import Vodal from 'vodal'
import './common/rem'
import 'vodal/common.css'
import 'vodal/zoom.css'
import 'vue2-toast/lib/toast.css'
import Toast from 'vue2-toast'
import './common/configHttp.js'
import './common/deviceInfo'
import * as filters from './common/filters'
import api from './api'
import './css/reset.css' // 全局css重置
import './css/public.css' // 全局公用css class
import './css/animate.css' // 全局公用css动画效果

Vue.config.productionTip = false

// 全局引入modal插件
Vue.component(Vodal.name, Vodal)

Vue.use(Toast, {
  type: 'center',
  duration: 3000,
  wordWrap: true,
  width: '80%',
})
// 全局滤镜
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key])
})

// 后台api接口 全局注册
Vue.use(api)

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app')
